import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { PhotoMetadata } from 'libs/db/entity/photoMetadata.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { PhotoMetadataCrudOps } from './photo-metadata-crud-ops';
import { PhotoMetadataService } from './photo-metadata.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(PhotoMetadataCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-admin'))
@ApiBearerAuth()
@ApiTags('照片管理-开发实例')   //标签
@Controller('PhotoMetadata')
export class PhotoMetadataController implements CrudController<PhotoMetadata> {
  constructor(public service: PhotoMetadataService) {
  }
}
